# 特殊方法__add__方法
class Student:
    def __init__(self, name):
        self.name = name

    def __add__(self, other):
        return self.name + other.name

    def __len__(self):
        return len(self.name)


stu1 = Student('张三')
stu2 = Student('李四')
s = stu1 + stu2
print(s)
s = stu1.__add__(stu2)
print(s)

# len()
lst = [1, 2, 3, 4, 5]
print(len(lst))
print(lst.__len__())
print(stu1.__len__())
print(len(stu1))
